﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProjectEuler;

namespace EulerTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            Problem p = new p1();
            Assert.AreEqual("Enter upper limit(1000):", p.strParamPrompt);
            Assert.AreEqual("23", p.Solve(10),"Sample test failed");
            Assert.AreEqual("0", p.Solve(0));
            Assert.AreEqual("3", p.Solve(4));
            Assert.AreEqual(p.Solve(null), p.Solve(1000));
        }
        [TestMethod]
        public void TestMethod2()
        {
            Problem p = new p2();
            Assert.AreEqual("Enter upper limit (4000000)", p.strParamPrompt);
            Assert.AreEqual(p.Solve(null), p.Solve(4000000));
            Assert.AreEqual("0", p.Solve(0));
            Assert.AreEqual("2", p.Solve(2));
            Assert.AreEqual("10", p.Solve(10));
            Assert.AreEqual("44", p.Solve(89));
        }
    }
}
